<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ include file="/common/common.jsp"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/sys/msg/";  //应用的地址名
String listActionName = basePath+"SysMsgDefine.action?op=searchjs";
String addActionName = basePath+"SysMsgDefine_add.action";
String editActionName = basePath+"SysMsgDefine_modify.action";
String delActionName = basePath+"SysMsgDefine_del.action?op=deljs";
%>
<script type="text/javascript">
    		$(function(){
			//表格初始化
			$('#searchTable').grid({
				//title:'<div style="text-align:center;font-size:17">消息提醒管理</div>',
				title:[<ce:menu/>],
				url:'<%=listActionName%>',
				queryParams:{"search.msgName":"","search.flag":""},  //用于查询的参数以及初始值
				//表头列，不建议改动
				frozenColumns:[[   
	                {field:'ck',checkbox:true},
	                {field:'flagName',title:'消息类别',width:80,sortable:true,editor:'text'}
				]],
				//数据列，根据显示的内容进行修改
				columns:[[   
						{field:'vcName',title:'消息定义名称',width:120},
						{field:'vcSql',title:'SQL语句',width:250},
						{field:'vcTitle',title:'消息显示信息',width:180},
						{field:'vcUrl',title:'跳转页面URL',width:180},
						//{field:'vcRescId',title:'权限关联',width:120,sortable:true,editor:'text'},
						{field:'menuName',title:'系统菜单',width:120,sortable:true,editor:'text'}
				]],
				//功能按钮组
                toolbar:[
                         {id:'btnadd',text:'新增',iconCls:'icon-add',handler:'openAddPage'},
                         {id:'btnEdit',text:'修改',iconCls:'icon-edit',handler:'openModifyPage'},
                         {id:'btnDel',text:'删除',iconCls:'icon-remove',handler:'deleteItems'}    
                         ]
			});
			//查询操作
			$('#search').click(function(){
                search();
            });		
		});	
		
		function search(){
           defaultSearchAction();  
		}
		
		//点击添加按钮后的操作：打开添加界面
        function openAddPage(){
            //默认的打开添加界面操作(添加页面地址，窗口宽度，窗口高度)
            defaultOpenAddPageHavebtn('<%=addActionName%>',600,390);
		}
		//点击编辑按钮后的操作：打开编辑界面
		function openModifyPage(){
		    //默认的打开编辑界面操作（编辑页面地址，窗口宽度，窗口高度）
            defaultOpenModifyPageHavebtn('<%=editActionName%>',600,390);
		}
		//删除数据操作
		function deleteItems(){
            defaultDeleteItems('<%=delActionName%>');
		}
		//点击帮助按钮后的操作：打开帮助界面
		function openHelpPage(){
		    defaultOpenWindow('<%=path%>/sys/menu/SysMenuHelp_look.action?chkSelf=<%=request.getAttribute("menuId").toString() %>','帮助信息查看',600,600);
		}
    
    </script>
<html>
  <head>
    <base href="<%=basePath%>"></base>
    <title><%=com.ce.util.RegeditUtil.getRegeditStringValue("SYSTEM_SEG_NAME") %></title>
  </head> 
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >

<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" align="center">
  <tr height="30">
    <td>
    <div id="searchDiv" class="searchDiv">
     <div id="searchLeft" style=" width:85%; float:left">
       <div id="searchWrite"  class="searchWrite">
       消息定义名称：<input type="text" id="msgName" name="msgName">
       消息类别：<select id="flag" name="flag"><option value="">全部</option><option value="0">个人消息</option><option value="1">公共消息</option></select> 
       </div>
       <div id="searchAuto" class="searchAuto" style="display:none">  
       </div>
     </div>
     <div id="searchRight" class="searchRight" style="padding-top:1px">
      <a id="search" href="javascript:void(0)" href="javascript:void(0)"  class="easyui-linkbutton" iconCls="icon-search">查询</a>
     </div>
   </div>
    </td>
  </tr>
  <tr>
    <td colspan="2"><div id="searchTable"></div></td>
  </tr>
</table>
</body>
</html>
   
   

